package orm.utils;

import org.junit.Test;
import orm.rzdata.domain.Dog;
import orm.rzdata.domain.User;
import orm.rzdata.utils.Tools;

import java.lang.reflect.Field;

/**
 * @author com.ymy.hadoop
 * @date 2018/12/16 12:50
 */
public class ToolsTest {

    @Test
    public void test02()throws Exception{
      Class<?> clazz =  User.class;
       // birthday name
        Field filed = clazz.getDeclaredField("birthday");
        System.out.println(Tools.getColumn(filed));
        System.out.println(Tools.getMethod(filed,"get"));
    }

    @Test
    public void test01(){
        String table1 = Tools.getTable(User.class);
        System.out.println(table1);

        String table2 = Tools.getTable(Dog.class);
        System.out.println(table2);
    }
}
